load("@batfish//skylark:junit.bzl", "junit_tests")
load("@rules_java//java:defs.bzl", "java_library")

package(
    default_testonly = True,
    default_visibility = ["//visibility:public"],
)

java_library(
    name = "bdd_testlib",
    srcs = glob(
        ["**/*.java"],
        exclude = ["**/*Test.java"],
    ),
    deps = [
        "//projects/bdd",
        "@maven//:junit_junit",
    ],
)

junit_tests(
    name = "bdd_tests",
    size = "small",
    srcs = glob(["**/*Test.java"]),
    skip_pmd = True,
    deps = [
        ":bdd_testlib",
        "//projects/bdd",
        "@maven//:com_google_guava_guava",
        "@maven//:junit_junit",
        "@maven//:org_apache_commons_commons_lang3",
        "@maven//:org_apache_logging_log4j_log4j_core",
        "@maven//:org_hamcrest_hamcrest",
    ],
)
